﻿#pragma once

#include "componentbase.h"

class TaskInfoSql
{
public:
	TaskInfoSql();
	~TaskInfoSql();

	bool Init();

	bool InsertTask(const QByteArray& data);

	bool ReadAllTask(QByteArrayList& tasks);

	bool DeleteTask(const QString& taskId);

	int OnTaskFinished(const QByteArray& data);

	QStringList GetTaskList();

private:
	ComponentBase* m_db = nullptr;
	QStringList m_taskList;
	QString m_tableName = "TaskInfo";
};
